@thallylabs/migrate 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -5
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1020 -154
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,12 +49,38 @@ computes redirects dynamically and can't be evaluated statically, so its
|
|
|
49
49
|
presence is reported with a warning instead of being silently ignored. A
|
|
50
50
|
static `--ifm-color-primary` accent color in the classic theme's `customCss`
|
|
51
51
|
file is imported the same way Mintlify's and Fern's theme colors are.
|
|
52
|
+
Versioned docs under `versioned_docs/` and translated docs under
|
|
53
|
+
`i18n/<locale>/docusaurus-plugin-content-docs/` are imported with their
|
|
54
|
+
navigation, including locale-prefixed routes such as `/fr/...`. Each version
|
|
55
|
+
and locale keeps its own route tree; sidebar entries without source documents
|
|
56
|
+
are reported.
|
|
57
|
+
Docusaurus heading ID comments such as `{/* #custom-id */}` become explicit
|
|
58
|
+
HTML anchors so links to those headings keep working after migration. Links
|
|
59
|
+
using Docusaurus' implicit heading slugs also get explicit aliases when the
|
|
60
|
+
linked heading or option-table field can be matched uniquely. Repeated option
|
|
61
|
+
fields use the nearest preceding row when all local references agree;
|
|
62
|
+
otherwise ambiguous anchors remain warnings.
|
|
63
|
+
Longer fenced code examples keep nested shorter fences inert. An archived
|
|
64
|
+
admonition missing its closing delimiter is closed before the next top-level
|
|
65
|
+
heading (or at the end of the page) so its remaining content stays importable.
|
|
66
|
+
Docusaurus `mdx-code-block` wrappers are opened as live MDX when the resulting
|
|
67
|
+
page compiles and its special fences contain no module declarations. Pages
|
|
68
|
+
whose fragments still need Docusaurus theme imports or remark plugins remain
|
|
69
|
+
fenced and are retained.
|
|
52
70
|
|
|
53
71
|
Fern repositories are located by their `fern/docs.yml` + `fern/fern.config.json`
|
|
54
72
|
pair. `docs.yml` is parsed as bounded YAML—never executed—and preserves tabs,
|
|
55
73
|
nested sections (including `slug`/`skip-slug`), navbar links, redirects, the
|
|
56
74
|
default Fern version's navigation, and theme accent colors. Only pages
|
|
57
75
|
referenced from `docs.yml` are imported, matching Fern's own publishing model.
|
|
76
|
+
Versioned `folder:` entries expand the Markdown files they contain, even when
|
|
77
|
+
the folder or an individual page is outside `fern/` but still inside the
|
|
78
|
+
checkout. An explicit empty tab `slug` keeps pages at the site root; a folder
|
|
79
|
+
title changes its navigation label without changing its directory-based URL.
|
|
80
|
+
Internal links are adjusted for the site's domain path, selected version, and
|
|
81
|
+
source-file routes. Links to sections not imported into Thally stay on the
|
|
82
|
+
published Fern site and produce a migration warning, so the generated site can
|
|
83
|
+
build while the remaining content is moved separately.
|
|
58
84
|
Every `api:` section's OpenAPI document is resolved from its own
|
|
59
85
|
`generators.yml` (`api.specs[].openapi`, or the legacy `api:` string) and
|
|
60
86
|
imported into its own tab — a docs.yml with several API sections (e.g. a REST
|
|
@@ -112,8 +138,16 @@ The importer creates a root redirect to the first available page in source
|
|
|
112
138
|
navigation when no root introduction exists, while retaining a separate custom
|
|
113
139
|
homepage and explicit redirects. Locale tags and recognized locale-prefixed
|
|
114
140
|
sections are normalized without discarding original URL redirects.
|
|
141
|
+
Mintlify's generated `param-*` links for settings headings and named fields
|
|
142
|
+
become explicit anchors in migrated MDX.
|
|
115
143
|
|
|
116
144
|
Simple interactive HTML blocks in MDX are extracted into client components.
|
|
145
|
+
For a copied client component that receives a simple page-authored JSX callback,
|
|
146
|
+
the importer moves the callback into a client wrapper and keeps the page. If
|
|
147
|
+
the callback cannot be moved safely, it keeps the page and the control's child
|
|
148
|
+
content as a passive fallback, with a warning identifying the control. A
|
|
149
|
+
stateful local snippet component is kept as a client component instead of
|
|
150
|
+
flattening away its hooks and state.
|
|
117
151
|
The Mintlify `search-bar-entry` click trigger is mapped to Thally's search
|
|
118
152
|
shortcut. Markdown mixed inside interactive JSX, computed imports, and
|
|
119
153
|
namespace imports are reported for manual review; unsupported source is
|
|
@@ -135,11 +169,9 @@ overrun), with a warning naming the page and the component. Packages the starter
|
|
|
135
169
|
kept as-is (except `react-dom/server`, whose string renderers throw under
|
|
136
170
|
Next) and copied into any extracted client module. A source site's own
|
|
137
171
|
`@/…` path aliases are treated like an unavailable package. A page that
|
|
138
|
-
passes a page-authored function
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
backed by one, such as `Accordion`/`Panel`/`Tabs`) is excluded the same way;
|
|
142
|
-
an unconfirmed target is warned instead of dropped.
|
|
172
|
+
passes a page-authored function into a client component needs the client
|
|
173
|
+
wrapper described above; unsupported callback shapes retain their content
|
|
174
|
+
with a warning. An unconfirmed target is warned for review.
|
|
143
175
|
File paths cannot escape the repository checkout; symlinks and oversized
|
|
144
176
|
graphs are rejected. This is compatibility analysis, **not a code sandbox**:
|
|
145
177
|
imported JavaScript executes when the developer builds or runs the resulting
|
package/dist/index.d.ts
CHANGED
|
@@ -221,6 +221,8 @@ interface RepositoryMigrationOptions {
|
|
|
221
221
|
docusaurusSkipPlugins?: boolean;
|
|
222
222
|
/** @internal Additional docs plugins default to autogenerated navigation. */
|
|
223
223
|
docusaurusSkipSidebar?: boolean;
|
|
224
|
+
/** @internal A version's sidebar is parsed as static data. */
|
|
225
|
+
docusaurusSidebarPath?: string;
|
|
224
226
|
/** @internal Static assets are shared across docs-plugin instances. */
|
|
225
227
|
docusaurusSkipAssets?: boolean;
|
|
226
228
|
/** @internal Redirects are global config, read once, not per plugin instance. */
|
|
@@ -345,6 +347,7 @@ declare function readFernConfig(fernRoot: string): {
|
|
|
345
347
|
declare function projectFernNavigation(input: {
|
|
346
348
|
config: Record<string, unknown>;
|
|
347
349
|
fernRoot: string;
|
|
350
|
+
repositoryRoot?: string;
|
|
348
351
|
}): FernNavigationResult;
|
|
349
352
|
|
|
350
353
|
/** Markdown/MDX normalization that preserves every component Thally supports. */
|
|
@@ -355,7 +358,7 @@ interface MarkdownPageIdentity {
|
|
|
355
358
|
locale?: string;
|
|
356
359
|
}
|
|
357
360
|
/** Normalize only syntax Thally cannot render; supported source JSX stays intact. */
|
|
358
|
-
declare function normalizeMdx(body: string, platform?: MigrationPlatform): string;
|
|
361
|
+
declare function normalizeMdx(body: string, platform?: MigrationPlatform, unwrapMdxCodeBlocks?: boolean): string;
|
|
359
362
|
/** Parse source Markdown or MDX into the canonical page representation. */
|
|
360
363
|
declare function parseMarkdownPage(input: {
|
|
361
364
|
id: string;
|